Integrand size = 33, antiderivative size = 197 \[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=-\frac {B \operatorname {AppellF1}\left (n,\frac {1}{2},-\frac {1}{2}-m,1+n,\sec (e+f x),-\sec (e+f x)\right ) (c \sec (e+f x))^n (1+\sec (e+f x))^{-\frac {1}{2}-m} (a+a \sec (e+f x))^m \tan (e+f x)}{f n \sqrt {1-\sec (e+f x)}}-\frac {(A-B) \operatorname {AppellF1}\left (n,\frac {1}{2},\frac {1}{2}-m,1+n,\sec (e+f x),-\sec (e+f x)\right ) (c \sec (e+f x))^n (1+\sec (e+f x))^{-\frac {1}{2}-m} (a+a \sec (e+f x))^m \tan (e+f x)}{f n \sqrt {1-\sec (e+f x)}} \]
-B*AppellF1(n,-1/2-m,1/2,1+n,-sec(f*x+e),sec(f*x+e))*(c*sec(f*x+e))^n*(1+s ec(f*x+e))^(-1/2-m)*(a+a*sec(f*x+e))^m*tan(f*x+e)/f/n/(1-sec(f*x+e))^(1/2) -(A-B)*AppellF1(n,1/2-m,1/2,1+n,-sec(f*x+e),sec(f*x+e))*(c*sec(f*x+e))^n*( 1+sec(f*x+e))^(-1/2-m)*(a+a*sec(f*x+e))^m*tan(f*x+e)/f/n/(1-sec(f*x+e))^(1 /2)
Leaf count is larger than twice the leaf count of optimal. \(4897\) vs. \(2(197)=394\).
Time = 21.49 (sec) , antiderivative size = 4897, normalized size of antiderivative = 24.86 \[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\text {Result too large to show} \]
(2^(1 + m)*(Sec[(e + f*x)/2]^2)^n*Sec[e + f*x]^(-1 - n)*(c*Sec[e + f*x])^n *(Cos[(e + f*x)/2]^2*Sec[e + f*x])^(m + n)*(a*(1 + Sec[e + f*x]))^m*(A + B *Sec[e + f*x])*(A*Sec[e + f*x]^n*(1 + Sec[e + f*x])^m + B*Sec[e + f*x]^(1 + n)*(1 + Sec[e + f*x])^m)*Tan[(e + f*x)/2]*((-3*A*AppellF1[1/2, m + n, 1 - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[e + f*x])/(3*Appell F1[1/2, m + n, 1 - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*(( -1 + n)*AppellF1[3/2, m + n, 2 - n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x )/2]^2] + (m + n)*AppellF1[3/2, 1 + m + n, 1 - n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2) - (B*AppellF1[1/2, 1 + m + n, - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])/(AppellF1[1/2, 1 + m + n , -n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (2*(n*AppellF1[3/2, 1 + m + n, 1 - n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (1 + m + n)*AppellF1[3/2, 2 + m + n, -n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2 ]^2])*Tan[(e + f*x)/2]^2)/3)))/(f*(B + A*Cos[e + f*x])*(1 + Sec[e + f*x])^ m*(-1 + Tan[(e + f*x)/2]^2)*(-((2^(1 + m)*(Sec[(e + f*x)/2]^2)^(1 + n)*(Co s[(e + f*x)/2]^2*Sec[e + f*x])^(m + n)*Tan[(e + f*x)/2]^2*((-3*A*AppellF1[ 1/2, m + n, 1 - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[e + f *x])/(3*AppellF1[1/2, m + n, 1 - n, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x )/2]^2] + 2*((-1 + n)*AppellF1[3/2, m + n, 2 - n, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (m + n)*AppellF1[3/2, 1 + m + n, 1 - n, 5/2, Ta...
Time = 0.72 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3042, 4511, 3042, 4315, 3042, 4314, 150}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sec (e+f x)+a)^m (A+B \sec (e+f x)) (c \sec (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^m \left (A+B \csc \left (e+f x+\frac {\pi }{2}\right )\right ) \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^ndx\) |
\(\Big \downarrow \) 4511 |
\(\displaystyle (A-B) \int (c \sec (e+f x))^n (\sec (e+f x) a+a)^mdx+\frac {B \int (c \sec (e+f x))^n (\sec (e+f x) a+a)^{m+1}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-B) \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^mdx+\frac {B \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n \left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{m+1}dx}{a}\) |
\(\Big \downarrow \) 4315 |
\(\displaystyle (A-B) (\sec (e+f x)+1)^{-m} (a \sec (e+f x)+a)^m \int (c \sec (e+f x))^n (\sec (e+f x)+1)^mdx+B (\sec (e+f x)+1)^{-m} (a \sec (e+f x)+a)^m \int (c \sec (e+f x))^n (\sec (e+f x)+1)^{m+1}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-B) (\sec (e+f x)+1)^{-m} (a \sec (e+f x)+a)^m \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n \left (\csc \left (e+f x+\frac {\pi }{2}\right )+1\right )^mdx+B (\sec (e+f x)+1)^{-m} (a \sec (e+f x)+a)^m \int \left (c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^n \left (\csc \left (e+f x+\frac {\pi }{2}\right )+1\right )^{m+1}dx\) |
\(\Big \downarrow \) 4314 |
\(\displaystyle -\frac {c (A-B) \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m \int \frac {(c \sec (e+f x))^{n-1} (\sec (e+f x)+1)^{m-\frac {1}{2}}}{\sqrt {1-\sec (e+f x)}}d\sec (e+f x)}{f \sqrt {1-\sec (e+f x)}}-\frac {B c \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m \int \frac {(c \sec (e+f x))^{n-1} (\sec (e+f x)+1)^{m+\frac {1}{2}}}{\sqrt {1-\sec (e+f x)}}d\sec (e+f x)}{f \sqrt {1-\sec (e+f x)}}\) |
\(\Big \downarrow \) 150 |
\(\displaystyle -\frac {(A-B) \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m (c \sec (e+f x))^n \operatorname {AppellF1}\left (n,\frac {1}{2},\frac {1}{2}-m,n+1,\sec (e+f x),-\sec (e+f x)\right )}{f n \sqrt {1-\sec (e+f x)}}-\frac {B \tan (e+f x) (\sec (e+f x)+1)^{-m-\frac {1}{2}} (a \sec (e+f x)+a)^m (c \sec (e+f x))^n \operatorname {AppellF1}\left (n,\frac {1}{2},-m-\frac {1}{2},n+1,\sec (e+f x),-\sec (e+f x)\right )}{f n \sqrt {1-\sec (e+f x)}}\) |
-((B*AppellF1[n, 1/2, -1/2 - m, 1 + n, Sec[e + f*x], -Sec[e + f*x]]*(c*Sec [e + f*x])^n*(1 + Sec[e + f*x])^(-1/2 - m)*(a + a*Sec[e + f*x])^m*Tan[e + f*x])/(f*n*Sqrt[1 - Sec[e + f*x]])) - ((A - B)*AppellF1[n, 1/2, 1/2 - m, 1 + n, Sec[e + f*x], -Sec[e + f*x]]*(c*Sec[e + f*x])^n*(1 + Sec[e + f*x])^( -1/2 - m)*(a + a*Sec[e + f*x])^m*Tan[e + f*x])/(f*n*Sqrt[1 - Sec[e + f*x]] )
3.3.75.3.1 Defintions of rubi rules used
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^2*d*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x ]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(d*x)^(n - 1)*((a + b*x)^(m - 1/2 )/Sqrt[a - b*x]), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m] && GtQ[a, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^IntPart[m]*((a + b*Csc[e + f*x])^FracPart[m ]/(1 + (b/a)*Csc[e + f*x])^FracPart[m]) Int[(1 + (b/a)*Csc[e + f*x])^m*(d *Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^ 2, 0] && !IntegerQ[m] && !GtQ[a, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(A*b - a*B)/b Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^n, x], x] + Simp[B/b Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b , d, e, f, A, B, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0]
\[\int \left (c \sec \left (f x +e \right )\right )^{n} \left (a +a \sec \left (f x +e \right )\right )^{m} \left (A +B \sec \left (f x +e \right )\right )d x\]
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int { {\left (B \sec \left (f x + e\right ) + A\right )} {\left (a \sec \left (f x + e\right ) + a\right )}^{m} \left (c \sec \left (f x + e\right )\right )^{n} \,d x } \]
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int \left (a \left (\sec {\left (e + f x \right )} + 1\right )\right )^{m} \left (c \sec {\left (e + f x \right )}\right )^{n} \left (A + B \sec {\left (e + f x \right )}\right )\, dx \]
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int { {\left (B \sec \left (f x + e\right ) + A\right )} {\left (a \sec \left (f x + e\right ) + a\right )}^{m} \left (c \sec \left (f x + e\right )\right )^{n} \,d x } \]
\[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int { {\left (B \sec \left (f x + e\right ) + A\right )} {\left (a \sec \left (f x + e\right ) + a\right )}^{m} \left (c \sec \left (f x + e\right )\right )^{n} \,d x } \]
Timed out. \[ \int (c \sec (e+f x))^n (a+a \sec (e+f x))^m (A+B \sec (e+f x)) \, dx=\int \left (A+\frac {B}{\cos \left (e+f\,x\right )}\right )\,{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^m\,{\left (\frac {c}{\cos \left (e+f\,x\right )}\right )}^n \,d x \]